home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2612 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  774 b 

  1. Path: globe.indirect.com!snoopy
  2. From: chrism@xroads.com (Chris McCabe)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Template function declaration?
  5. Date: 18 Jan 1996 19:02:09 GMT
  6. Organization: Internet Direct, Inc.
  7. Message-ID: <4dlu7t$7a_005@news.indirect.com>
  8. References: <4d5coq$em1@hemuli.tte.vtt.fi>
  9. NNTP-Posting-Host: snoopy.infograph.com
  10. X-Newsreader: News Xpress Version 1.0 Beta #3
  11.  
  12. In article <4d5coq$em1@hemuli.tte.vtt.fi>,
  13.    Ali Lattunen <Ali.Lattunen@vtt.fi> wrote:
  14. >  How to declare a template function in another module?
  15.  
  16.   Put the template definition in a header file and include
  17. it in any source file that needs it.  The compiler will
  18. ignore the template definition until it is needed.  The linker
  19. will prevent multiple definitions of the same function.
  20.  
  21.   -Chris
  22.